Passed
Pull Request — master (#223)
by Daniel
02:18 queued 38s
created

MainClass.initialize   A

Complexity

Conditions 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
1
import "animate.css";
2
3
import checkValidText from "./classes/ValidText/classValidText";
4
import sendForm from "./classes/ProcessInputForm/classProcessInputForm";
5
6
const initialize = (): void => {
7
  const textInput = window.document.getElementById(
8
    "bilinformasjon"
9
  ) as HTMLInputElement;
10
  const textForm = window.document.getElementById(
11
    "regnrform"
12
  ) as HTMLFormElement;
13
14
  if (textInput && textForm) {
15
   
16
17
    textInput.addEventListener("input", checkValidText);
18
   
19
    textForm.addEventListener("submit", (event) => {
20
      event.preventDefault();
21
      sendForm;
22
    });
23
24
   
25
  }
26
};
27
28
initialize();
29